package com.yc.RSS.dao;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

/**
 * @author zwei
 * @create 2024-07-24 16:00
 */
public class ProjectProperties extends Properties {
    private static ProjectProperties instance;
    private ProjectProperties(){
        //读取配置文件
        InputStream iis=ProjectProperties.class.getClassLoader().getResourceAsStream("project.properties");
        //Properties类的一个load方法加载
        try {
            this.load(iis);
        } catch (IOException e) {
            throw new RuntimeException(e);
        }
    }
    public static ProjectProperties getInstance() {
        if (instance==null){
            instance=new ProjectProperties();
        }
        return instance;
    }
}
